package cn.itcast.dubbo.service.impl;

import cn.itcast.dubbo.pojo.User;
import cn.itcast.dubbo.service.UserService;
import com.alibaba.dubbo.config.annotation.Service;

import java.util.ArrayList;
import java.util.List;

@Service(version = "${dubbo.service.version}")
public class UserServiceImpl implements UserService {
    @Override
    public List<User> queryAll() {
        List<User> userList = new ArrayList<>();
        for(int i = 0 ; i < 10 ; i++){
            User user = new User();
            user.setAge(10+i);
            user.setId(Long.valueOf(i+1));
            user.setPassword("123456");
            user.setUsername("username_"+i);
            userList.add(user);
        }
        return userList;
    }
}
